package com.bluevally.microservice.user.dao;

import com.alibaba.druid.pool.DruidDataSource;

import javax.sql.DataSource;

/**
 * Created by lixiaoming on 2019/1/9.
 */
public class JdbcHelper {

    public static DataSource create(){

        DruidDataSource druidDataSource = new DruidDataSource();
        //druidDataSource.configFromPropety(properties);
        String url = "jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8";
        druidDataSource.setUrl(url);
        String password = "lxm2214";
        druidDataSource.setPassword(password);
        String userName = "root";
        druidDataSource.setUsername(userName);

        return druidDataSource;
    }
}
